//
//  Analytics.m
//  MemoryMaster
//
//  Created by liyu on 2017/11/4.
//
//

#import "Analytics.h"

@implementation Analytics

+ (void) start:(NSString *)appKey channel:(NSString *)channelId {
    [AIOAnalytics start:appKey channel:channelId];
    [UMConfigure initWithAppkey:appKey channel:channelId];
}

+ (void) start:(NSString *)appKey channel:(NSString *)channelId withPushNotificationConfig:(NSDictionary *)types delegate:(id)delegate {
    [AIOAnalytics start:appKey channel:channelId withPushNotificationConfig:types delegate:delegate];
}

+ (void) beginPage:(NSString *)pageId {
    [AIOAnalytics beginPage:pageId];
    [MobClick beginLogPageView:pageId];
}

+ (void) endPage:(NSString *)pageId {
    [AIOAnalytics endPage:pageId];
    [MobClick endLogPageView:pageId];
}

+ (void) event:(NSString *)eventId {
    [AIOAnalytics event:eventId];
    [MobClick event:eventId];
}

+ (void) event:(NSString *)eventId value:(int)number {
    [AIOAnalytics event:eventId value:number];
    [MobClick event:eventId durations:number];
}

+ (void) event:(NSString *)eventId attribute:(NSString *)attribute {
    [AIOAnalytics event:eventId attribute:attribute];
    [MobClick event:eventId label:attribute];
}

+ (void) event:(NSString *)eventId attribute:(NSString *)attribute value:(int)number {
    [AIOAnalytics event:eventId attribute:attribute value:number];
    [MobClick event:eventId label:attribute durations:number];
}

+ (void) event:(NSString *)eventId attributes:(NSDictionary *)attributes {
    [AIOAnalytics event:eventId attributes:attributes];
    [MobClick event:eventId attributes:attributes];
}

+ (void) event:(NSString *)eventId attributes:(NSDictionary *)attributes value:(int)number {
    [AIOAnalytics event:eventId attributes:attributes value:number];
    [MobClick event:eventId attributes:attributes durations:number];
}
@end

